home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_pyr_pitfall.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  92 lines

  1. # Jones 3D Cog Script
  2. #
  3. # pyr_pitfall.cog
  4. #
  5. # Kills Indy if he falls into the pit while the machine is off.
  6. #
  7. # [GGJ] + [RKD]
  8. #
  9. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13. message entered
  14. message    user1
  15.  
  16. # surfaces near the dirtmover
  17. surface    floorSurf1        linkid=1
  18. surface    floorSurf2        linkid=1
  19. surface    floorSurf3        linkid=1
  20. surface    floorSurf4        linkid=1
  21. surface    floorsurf5        linkid=1
  22.  
  23. surface    safeTrigger        linkid=1
  24.  
  25. # sector in front of dirtmover
  26. sector    unsafeTrigger
  27.  
  28. # sectors containing the dirtmover
  29. sector    nearsector1    nolink
  30. sector    nearsector2    nolink
  31.  
  32. # sectors far away from the dirtmover
  33. sector    farsector2    nolink
  34. sector    farsector3    nolink
  35. sector    farsector4    nolink
  36.  
  37. # world things
  38. thing    minecar        linkid=1
  39. thing    shovel        linkid=1
  40. thing    player        local
  41.  
  42. # variables
  43. int        deadly=1    local
  44. end
  45.  
  46. code
  47. user1:
  48. # ---> dirtmover control cog
  49.  
  50.     # machine on makes floors non-deadly
  51.     deadly = 0;
  52.     
  53.     ClearSectorFlags(nearsector1, 0x40);
  54.     ClearSectorFlags(nearsector2, 0x40);
  55.  
  56.     return;
  57.  
  58. entered:
  59. # ---> various surfaces and things
  60.  
  61.     player = GetLocalPlayerThing();
  62.  
  63.     # if indy gets near horner area by walking, horner area isn't automatically deadly
  64.     if (GetSenderRef() == safetrigger)
  65.     {
  66.         # note: farsector1 removed from cog
  67.         ClearSectorFlags(farsector2, 0x40);
  68.         ClearSectorFlags(farsector3, 0x40);
  69.         ClearSectorFlags(farsector4, 0x40);
  70.     }
  71.  
  72.     # if indy gets out of pit, horner area is deadly again
  73.     if (GetSenderRef() == unsafetrigger)
  74.     {
  75.         SetSectorFlags(farsector2, 0x40);
  76.         SetSectorFlags(farsector3, 0x40);
  77.         SetSectorFlags(farsector4, 0x40);
  78.         return;
  79.     }
  80.     
  81.     # if indy is in jeep, kill him
  82.     if (global2 == 1)
  83.     {
  84.         DamageThing(player, 1000, 1, player);
  85.         return;
  86.     }
  87.     
  88.     return;
  89.  
  90. end
  91.  
  92.